
layui.use(['form','jquery'],function(){

    //登录按钮
    layui.form.on("submit(login)",function(data){
        $("#login").text("验证中...").attr("disabled","disabled").addClass("layui-disabled");
        $.ajax({
            url: "/loginCenterRest/check",
            type: "post",
            data: data.field,
            success: function(){
                location.href = "/customer/list";
            },
            error: function (xmlHttpRequest) {
                $("#login").text("重新验证").removeAttr("disabled").removeClass("layui-disabled");
            }
        });
        return false;
    });

});